#pragma once

#include "CoreMinimal.h"

DECLARE_LOG_CATEGORY_EXTERN(EasyHttpLog,Log,All);

#define HttpLogDebug(format, ...) UE_LOG(EasyHttpLog, Log, TEXT(format), ##__VA_ARGS__)
#define HttpLogWarning(format, ...) UE_LOG(EasyHttpLog, Warning, TEXT(format), ##__VA_ARGS__)
#define HttpLogError(format, ...) UE_LOG(EasyHttpLog, Error, TEXT(format), ##__VA_ARGS__)
#define HttpLogFatal(format, ...) UE_LOG(EasyHttpLog, Fatal, TEXT(format), ##__VA_ARGS__)


#define HttpLogDebugf(bValid, format, ...) \
if(!(bValid)) { \
	HttpLogDebug(format, ##__VA_ARGS__); \
}

#define HttpLogWarningf(bValid, format, ...) \
if(!(bValid)) { \
	HttpLogWarning(format, ##__VA_ARGS__); \
}

#define HttpLogErrorf(bValid, format, ...) \
if(!(bValid)) { \
	HttpLogError(format, ##__VA_ARGS__); \
}

#define HttpLogFatalf(bValid, format, ...) \
if(!(bValid)) { \
	HttpLogFatal(format, ##__VA_ARGS__); \
}
